<?php
class ContactForm extends CFormModel
{
	public $name;
	public $email;
	public $subject;
	public $body;
	public $verifyCode;

	/**
	 * Declares the validation rules.
	 */
	public function rules()
	{
		return array(
			array('name, email, subject, body', 'required'),
			array('verifyCode', 'captcha', 'allowEmpty'=>!extension_loaded('gd'), 'captchaAction'=>'index/captcha'),
		);
	}

	/**
	 * Declares customized attribute labels.
	 * If not declared here, an attribute would have a label that is
	 * the same as its name with the first letter in upper case.
	 */
	public function attributeLabels()
	{
		return array(
			'name'=>'Имя',
			'verifyCode'=>'Антиробот',
			'body'=>'Текст',
			'subject'=>'Тема',
			
		);
	}
}